<%@ page language="java" import="java.util.*,office.BusiUtil" pageEncoding="UTF-8"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
<base href="<%=basePath%>"/>
<div id="pop_up_content">
	<div class="pop_up_title images_1">
		新建工作计划
	</div>
	<div class="pop_up_body">
		<form id="tripAddAction" action="personPlan/savePlanYear.action" method="post" >
		<table border="0" cellpadding="0" cellspacing="0"  width="400">
			<tr>
				<td>
					<div class="form_input_value">
						计划标题:
					</div>
				</td>
				<td>
					<input type="hidden" name="planVo.user.id" value="<s:property value='#session.user.userId'/>" >
					<input type="hidden" name="templateId" value="<s:property value="templateId"/>">
					<input type="text" name="planVo.title">
					<input type="hidden" name="planVo.makeYear" value="<s:property value="planYear"/>">
					<input type="hidden" name="planYear" value="<s:property value="planYear"/>">
				</td>
			</tr>
			<tr>
				<td valign="top">
					<div class="form_input_value">
						计划内容:
					</div>
				</td>
				<td>
					<textarea id='planContent' name='planVo.content' class='dialogy_input max_length:100 required' rows='' cols='' style='width:520px;height:400px;overflow-y:scroll;overflow-x:hidden;margin-left: 8px;'><s:property value="planVo.content"/></textarea>
				</td>
			</tr>
			<tr>
				<td></td>
				<td>
					<input type="submit" value="提交" onclick="return submitPlan();" class="btn" onmouseout="this.className='btn'" onmousedown="this.className='btn1'" onmouseover="this.className='btn2'">
					<input type="button" value="取消" class="btn" onclick="hideDialog();" onmouseout="this.className='btn'" onmousedown="this.className='btn1'" onmouseover="this.className='btn2'">
				</td>
			</tr>
		</table>
		</form>
	</div>
</div>
<script type="text/javascript">
 	function submitPlan(){
 	 	var planContent = document.getElementById('planContent').value;
 	 	if(planContent == null || planContent == ""){
 	 	 	alert("计划内容不能为空，请重新填写！");
			return false;
 	 	}else if(planContent.length <= 10){
 	 		alert("您编写的计划少于10个字，请完善您的工作计划！");
 	 		return false;
 	 	}else{
 	 		if(window.confirm("您确认提交当前计划吗？")){
 				if(window.confirm("注意！计划提交之后将不可以在修改，继续提交请按‘确定’，‘取消’可返回到编辑页面！")){
 					return true;
 				}else{
 					return false;
 				}
 			}else{
 				return false;
 			}
 	 	}
 	}
</script>
